package com.example.design.obServerDemo;

public class TestObserver {

  public static void main(String[] args) {
    Subject subject = new Subject();
    MathSubjectObserver mathSubjectObserver = new MathSubjectObserver(subject);
    SportsSubjectObserver sportsSubjectObserver = new SportsSubjectObserver(subject);
    subject.setName("测试");
  }

}
